package reusingclass;


public class Exercise16 {
	public static void main(String[] args) {
		Amphibian frog = new Frog();
		frog.f();
		frog.g();
		frog.h();
		frog.f1();
		
	}
}

class Amphibian {
	
	private String s = "hello";
	
	public void f() {System.out.println("Amphibian.f()");}
	public void g() {System.out.println("Amphibian.g()");}
	public void h() {System.out.println("Amphibian.h()");}
	public void f1() {System.out.println(s);}
}

class Frog extends Amphibian{
	private String s = "world";
	public void f() {System.out.println("Frog.f()");}
	public void g() {System.out.println("Frog.g()");}
	public void h() {System.out.println("Frog.h()");}
	
}

